package com.example.red_black_tree;

/**
 * @ClassName Node
 * @Description TODO
 * @Author: XMK
 * @Date: 2021/1/7 20:24
 * @Version: 1.0
 */
public class Node {
    boolean isBlack;
    Node parent;
    Node uncle;
    Node grandparent;
    Node right;
    Node left;

    void rotateLeft() {
        right.parent = parent;
        parent = right;
        right.left = this;
    }

    void rotateRight() {
        left.parent = parent;
        parent = left;
        left.right = this;
    }
}
